package com.carleasoft.mps.data.redis.base;

/**
 *  该枚举类自己服务内创建，请忽在baseTools模块直接添加
 */
public enum CacheKeyEnum implements ICacheKey {

	/**
	 *  服务名称+使用功能+过期时间（不需要过期给null）
	 */
	PREFIX_SHIRO_REFRESH_TOKEN("adu:shiro:", "token", 60),
	PREFIX_UESRCACHE("adu:", "user:cache:", 60),
	PREFIX_PERMS_CACHE_DATA("adu:perms:", "data", 60),
	PREFIX_PERMS_CACHE_MENU("adu:perms:", "menu", 60),
	PREFIX_SHIRO_CACHE_MENU("shiro:perms:", "uri", 60),
	PREFIX_SMS_VERIFICATION_CODE("sms:verification:","code",60 * 5),
	PREFIX_EQUIPMENT_VERIFICATION_CODE("equipment","code",60),
	PREFIX_CRIMINAL_CODE("criminal:","code",24*60*60),

	MY_DOC_REMOVE("doc:remove:","",60 * 60 * 24 * 30),

	PREFIX_WITHE_API("white:api","",60 * 60 * 24 * 30)

	;
	private String moduleService;

	private String functionInfo;

	private Integer exportTime;

	CacheKeyEnum(String moduleService, String functionInfo, Integer exportTime) {
		this.moduleService = moduleService;
		this.functionInfo = functionInfo;
		this.exportTime = exportTime;
	}

	@Override
	public String getModuleService(){
		return this.moduleService;
	}

	@Override
	public String getFunctionInfo(){
		return this.functionInfo;
	}

	@Override
	public Integer getExportTime(){
		return this.exportTime;
	}

}
